<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>商品详情</title>
<link type="text/css" rel="stylesheet" href="${applicationScope.basePath}easybuy/css/style.css" />
<style type="text/css"></style>
<script type="text/javascript" src="${applicationScope.basePath}easybuy/scripts/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="${applicationScope.basePath}easybuy/scripts/function.js"></script>
<script type="text/javascript">
/* $(
	function kong(){
		var content=$("#content").val();		
		if(content.equals("")){
			$("#tishi").text("评论内容不能为空");
		}
	}
) */
</script>
</head>
<body>
	<a href="../ShopCarServlet" >购物车X件</a>
	<div id="product" class="main">
		<h1>${goods.g_name}</h1>
		<h1>${goods.g_id}</h1>
		<div class="infos">
			<div class="thumb">
			<img src="${applicationScope.basePath}easybuy/images/product/${goods.g_address}" width="110" height="106" /></div>
			<div class="buy">
				商城价：<span class="price">${goods.g_price}</span><br />
				库　存：${goods.store}
			  <div class="button">
<input type="button" name="button" value="" onclick="location.href ='${applicationScope.basePath}AddressShowServlet'" />
			  <a href="${applicationScope.basePath}ShopServlet?goods=${goods.g_id}">放入购物车</a></div>
			</div>
			<div class="clear"></div>
		</div>
		<div class="introduce">
			<h2><strong>商品详情</strong></h2>
			<div class="text">
				${goods.descripe}<br />
				<br />
			</div>
		</div>
	</div>
<table>
<tr><td>评论内容</td><td>时间</td><td>评论人</td></tr>	
<c:forEach items="${commentlist}" var="comment" varStatus="vs" >
<tr><td>${comment.c_content}</td><td>${comment.c_time}</td><td><a href="#"> ${comment.u_id}</a></td></tr>
</c:forEach>
</table>
	<a href="../CommentShowServlet?currentPage=1">首页</a>

 <c:if test="${pb.currentPage!=1}" var="result">
<a href="../CommentShowServlet?currentPage=${pb.currentPage-1}">上一页</a>
</c:if>

<a href="../CommentShowServlet?currentPage=${pb.currentPage+1}">下一页</a>
<a href="../CommentShowServlet?currentPage=${pb.totalPage}">末页</a>
	<div class="clear">
	<form action="../CommentServlet?name=${goods.g_id}" method="post">
	<input type="text" name="content" id="content" style="height:50px;width:100px;"/><span id="tishi">${tishi}</span> <br/>
	<input type="submit" value="评论" onclick="kong()"/>
	</form>
	<c:if test="${jie==1}">
		<c:if test="${jieguo==1}">
		<p>已评论</p>
		</c:if>
		<c:if test="${jieguo!=1}">
		<p>评论失败、重新评论</p>
		</c:if>
		</c:if>
	</div>

<div id="footer">
	Copyright &copy; 2013云和学院 All Rights Reserved. 京ICP证1000001号</div>
</body>
</html>